package org.snare.alumni.constant;

import lombok.Getter;

@Getter
public enum CardStatusEnum {

    TREND("-2", "停用"),
    COMMENT("-1", "未通过"),
    TALK("0", "未匹配"),
    TAG("1", "审批中"),
    USER("2", "审批通过");

    private final String code;

    private final String name;

    CardStatusEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getText(String code) {
        for (CardStatusEnum typeEnum : CardStatusEnum.values()) {
            if (typeEnum.getCode().equals(code)) {
                return typeEnum.getName();
            }
        }
        return code;
    }

}
